.TH std::bitset::size 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::bitset::size \- std::bitset::size

.SH Synopsis
   std::size_t size() const;  (noexcept since C++11)
                              (constexpr since C++11)

   Returns the number of bits that the bitset holds.

.SH Parameters

   \fI(none)\fP

.SH Return value

   number of bits that the bitset holds, i.e. the template parameter N.

.SH Example


// Run this code

 #include <bitset>
 #include <iostream>

 int main()
 {
     std::cout << std::bitset<0x400>().size() << '\\n';
 }

.SH Output:

 1024

.SH See also

   count returns the number of bits set to true
         \fI(public member function)\fP
